package com.csun.dsms.enums;

public enum DisabilityDetailsEnum {
    // 残疾详情
    YIJI("1", "一级"),
    ERJI("2", "二级"),
    SANJI("3", "三级"),
    SIJI("4", "四级"),
    ;


    private String code;
    private String msg;

    public String msg() {
        return msg;
    }

    public String code() {
        return code;
    }

    DisabilityDetailsEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

//    public static DisabilityTypeEnum getEnum(String code) {
//        for (DisabilityTypeEnum ele : DisabilityTypeEnum.values()) {
//            if (ele.code() == code) {
//                return ele;
//            }
//        }
//        return null;
//    }

    public static DisabilityDetailsEnum getEunm(String msg) {
        for (DisabilityDetailsEnum ele : DisabilityDetailsEnum.values()) {
            if (ele.msg().equals(msg)) {
                return ele;
            }
        }
        return null;
    }

}
